package com.ztools.pc.provider;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ztools.api.service.pc.PcCardService;
import com.ztools.common.model.pc.card.CardMaster;
import com.ztools.common.model.pc.card.CardRechargeRecord;
import com.ztools.common.util.common.PageUtil;
import com.ztools.pc.service.card.CardMasterService;
import com.ztools.pc.service.card.CardRechargeRecordService;
import org.apache.dubbo.config.annotation.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Author: seeTools
 * @Date: 2023/6/26  19:18
 * @Version 1.0
 */
@Service(version = "1.0", timeout = 3000)
public class PcCardServiceImpl implements PcCardService {

    @Resource
    private CardMasterService cardMasterService;
    @Resource
    private CardRechargeRecordService cardRechargeRecordService;


    @Override
    public List<CardMaster> getCardList(Long memberId) {
        return cardMasterService.getCardList(memberId);
    }

    @Override
    public CardMaster getCardInfoByNo(String cardNo) {
        return cardMasterService.getCardInfoByNo(cardNo);
    }

    @Override
    public Page<CardRechargeRecord> getCardRechargeRecord(PageUtil<CardRechargeRecord> pageUtil) {
        return cardRechargeRecordService.findList(pageUtil);
    }

}
